namespace FileStorageService.Constants;

/// <summary>
/// 文件存储服务常量定义
/// </summary>
public static class FileStorageConsts
{
    /// <summary>
    /// 模块名称
    /// </summary>
    public const string ModuleName = "FileStorageService";

    /// <summary>
    /// 最大文件名长度
    /// </summary>
    public const int MaxFileNameLength = 255;

    /// <summary>
    /// 最大文件路径长度
    /// </summary>
    public const int MaxFilePathLength = 1000;

    /// <summary>
    /// 最大文件描述长度
    /// </summary>
    public const int MaxFileDescriptionLength = 500;

    /// <summary>
    /// 最大文件大小（默认100MB）
    /// </summary>
    public const long MaxFileSize = 100 * 1024 * 1024; // 100MB

    /// <summary>
    /// 支持的图片格式
    /// </summary>
    public static readonly string[] SupportedImageFormats = { ".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp" };

    /// <summary>
    /// 支持的视频格式
    /// </summary>
    public static readonly string[] SupportedVideoFormats = { ".mp4", ".avi", ".mov", ".wmv", ".flv", ".mkv" };

    /// <summary>
    /// 支持的音频格式
    /// </summary>
    public static readonly string[] SupportedAudioFormats = { ".mp3", ".wav", ".flac", ".aac", ".ogg" };

    /// <summary>
    /// 支持的文档格式
    /// </summary>
    public static readonly string[] SupportedDocumentFormats = { ".pdf", ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".txt" };

    /// <summary>
    /// 支持的压缩包格式
    /// </summary>
    public static readonly string[] SupportedArchiveFormats = { ".zip", ".rar", ".7z", ".tar", ".gz" };

    /// <summary>
    /// 默认缩略图宽度
    /// </summary>
    public const int DefaultThumbnailWidth = 200;

    /// <summary>
    /// 默认缩略图高度
    /// </summary>
    public const int DefaultThumbnailHeight = 200;

    /// <summary>
    /// 文件分块上传大小（5MB）
    /// </summary>
    public const int ChunkSize = 5 * 1024 * 1024; // 5MB

    /// <summary>
    /// 缓存键前缀
    /// </summary>
    public const string CacheKeyPrefix = "FileStorage:";
}